﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
namespace GiaoDien
{
    public partial class Form1 : Form
    {
        static public string manhanvien="";
        public Form1()
        {
            InitializeComponent();
        }

        private void thêmToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form frm = new FormHoSoNhanVien();
            frm.ShowDialog();
        }

        private void thêmToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormThongTinSach();
            frm.ShowDialog();
        }

      
        private void bộPhậnToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form frm = new FORMBOPHAN();
            frm.ShowDialog();
        }

        private void thẻLoạiSáchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FORMTHELOAISACH();
            frm.ShowDialog();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            /*Form frm = new FORMDANGNHAP();
            frm.ShowDialog();
            if (manhanvien == "")
                Application.Exit();*/
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show(manhanvien);
        }

        private void saoLưuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BACKUPBUS bkBUS= new BACKUPBUS();
            bool kq = bkBUS.backup();
            if (kq==true)
                MessageBox.Show("Backup thành công");
            else
                MessageBox.Show("Backup thất bại");
        }

        private void khôiPhụcToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RESTOREBUS rtBUS = new RESTOREBUS();
            bool kq = rtBUS.restoredatabase();
            if (kq == true)
                MessageBox.Show("Restore thành công");
            else
                MessageBox.Show("Restore thất bại");
        }

        private void loạiĐộcGiảToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FORMLOAIDOCGIA();
            frm.ShowDialog();
        }

        private void thêmToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            Form frm = new FormTheDocGia();
            frm.ShowDialog();
        }

        private void phiếuThuTiềnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new  FormTraCuuSach();
            frm.ShowDialog();
        }

        private void mượnSáchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormMuonSach();
            frm.ShowDialog();
        }

        private void trảSáchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormTraSach();
            frm.ShowDialog();
        }

        private void sáchToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            Form frm = new FORMQUYDINHSACH();
            frm.ShowDialog();
        }
    }
}
